﻿<!-- "script/apps/Aries/Creator/Game/Areas/SystemMenuPage.html" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <pe:mcml>
<script refresh="false" type="text/npl" src="SystemMenuPage.lua"><![CDATA[
local SystemMenuPage = commonlib.gettable("MyCompany.Aries.Creator.Game.Desktop.SystemMenuPage");
SystemMenuPage.OnInit();
function ClosePage()
    Page:CloseWindow();
end
function OnViewBag()
    System.App.Commands.Call("Profile.Aries.SpecialAreaShow", {id = 3});
end
function OnSettings()
    MyCompany.Aries.Desktop.Dock.OnSystemSetting();
end

function OnLeave()
    ClosePage()
    _guihelper.MessageBox("你确定要离开么？ 记得要保存世界哦~", function(res)
	    if(res == _guihelper.DialogResult.Yes) then
            MyCompany.Aries.Creator.Game.Desktop.OnLeaveWorld();
	    end
    end, _guihelper.MessageBoxButtons.YesNo, nil);
end

function OnHelp()
    ClosePage()
    NPL.load("(gl)script/apps/Aries/Creator/Game/GameMarket/GameHelpPage.lua");
    local GameHelpPage = commonlib.gettable("MyCompany.Aries.Creator.Game.Desktop.GameHelpPage");
    GameHelpPage.ShowPage(true)
end

function OnGameMarket()
    ClosePage()
    NPL.load("(gl)script/apps/Aries/Creator/Game/GameMarket/EnterGamePage.lua");
	local EnterGamePage = commonlib.gettable("MyCompany.Aries.Creator.Game.Desktop.EnterGamePage");
	EnterGamePage.ShowPage(true)
end

function OnLoadGame()
    ClosePage()
    NPL.load("(gl)script/apps/Aries/Creator/CreateOpenWorld.lua");
    local CreateOpenWorld = commonlib.gettable("MyCompany.Aries.Creator.CreateOpenWorld")
	CreateOpenWorld.ShowOpenWorldPage();
end

function OnUploadGame()
    ClosePage()
    NPL.load("(gl)script/apps/Aries/Creator/Game/Areas/EditorModeSwitchPage.lua");
    EditorModeSwitchPage = commonlib.gettable("MyCompany.Aries.Creator.Game.Desktop.EditorModeSwitchPage");
    EditorModeSwitchPage.OnClickUpload();
end

function OnSaveGame()
    ClosePage()
    NPL.load("(gl)script/apps/Aries/Creator/Game/Areas/EditorModeSwitchPage.lua");
    EditorModeSwitchPage = commonlib.gettable("MyCompany.Aries.Creator.Game.Desktop.EditorModeSwitchPage");
    EditorModeSwitchPage.OnClickSave();
end

function OnFriendsPage()
    ClosePage()
    System.App.Commands.Call("Profile.Aries.FriendsWnd");
end

function OnTextureModPage()
    ClosePage();
    NPL.load("(gl)script/apps/Aries/Creator/Game/Areas/TextureModPage.lua");
    local TextureModPage = commonlib.gettable("MyCompany.Aries.Creator.Game.Desktop.TextureModPage");
    TextureModPage.ShowPage(true);
end
]]></script>
<div style="width:250px;height:300px;" class="window">
    <div class="titlebar" width="100%">
        <div class="windowlabel" >系统</div>
        <input type="button" style="margin-top:1px;margin-right:5px" onclick="ClosePage" class="closewindow"/>
    </div>
    <div class="clientarea" style="margin-left:7px;margin-right:7px">
        <div style="width:190px;" align="center">
            <input type="button" class="button" value="操作提示(F1)" onclick="OnHelp" style="margin-top:2px;font-size:14px;font-weight:bold;height:30px;width:180px;" /> <br />
            <input type="button" class="button" value="加载世界..." onclick="OnLoadGame" style="margin-top:10px;font-size:14px;font-weight:bold;height:30px;width:180px;" /> <br />
            <input type="button" class="button" value="分享世界..." onclick="OnUploadGame" style="margin-top:2px;font-size:14px;font-weight:bold;height:30px;width:180px;" /> <br />
            <input type="button" class="button" value="保存世界(Ctrl+S)" onclick="OnSaveGame" style="margin-top:2px;font-size:14px;font-weight:bold;height:30px;width:180px;" /> <br />
            <input type="button" class="button" value="材质包..." onclick="OnTextureModPage" style="margin-top:2px;font-size:14px;font-weight:bold;height:30px;width:90px;" /> 
                <input type="button" class="button" value="邀请好友..." onclick="OnFriendsPage" style="margin-top:2px;font-size:14px;font-weight:bold;height:30px;width:90px;" /><br />
            <input type="button" class="button" value="系统设置" onclick="OnSettings" style="margin-top:2px;font-size:14px;font-weight:bold;height:30px;width:180px;" /> <br />
            <input type="button" class="button" value="离开空间" onclick="OnLeave" style="margin-top:10px;font-size:14px;font-weight:bold;height:30px;width:180px;" /> <br />
        </div>
    </div>
</div>
</pe:mcml>
</body>
</html>

